/**
 * 空状态组件样式
 * @description 自定义空状态组件的样式定义
 */

.empty {
  /* 基础样式 */
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
  text-align: center;
  min-height: 200px;
}

/* 不同尺寸 */
.empty.small {
  padding: 20px 10px;
  min-height: 120px;
}

.empty.large {
  padding: 60px 30px;
  min-height: 300px;
}

/* 有操作按钮时的样式 */
.empty.hasAction {
  gap: 24px;
}

.empty.small.hasAction {
  gap: 16px;
}

.empty.large.hasAction {
  gap: 32px;
}

/* 图标包装器 */
.iconWrapper {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
}

/* 图标样式 */
.icon {
  font-size: 64px;
  color: #d9d9d9;
  transition: color 0.3s ease;
}

.icon.small {
  font-size: 48px;
}

.icon.large {
  font-size: 80px;
}

/* 描述区域 */
.description {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-width: 400px;
}

/* 标题样式 */
.title {
  font-size: 16px;
  font-weight: 600;
  color: #262626;
  line-height: 1.4;
}

.empty.small .title {
  font-size: 14px;
}

.empty.large .title {
  font-size: 18px;
}

/* 描述文本样式 */
.text {
  font-size: 14px;
  color: #8c8c8c;
  line-height: 1.5;
  margin-top: 4px;
}

.empty.small .text {
  font-size: 12px;
}

.empty.large .text {
  font-size: 16px;
}

/* 覆盖 Ant Design Empty 的默认样式 */
.empty :global(.ant-empty) {
  margin: 0;
}

.empty :global(.ant-empty-image) {
  height: auto;
  margin-bottom: 16px;
}

.empty.small :global(.ant-empty-image) {
  margin-bottom: 12px;
}

.empty.large :global(.ant-empty-image) {
  margin-bottom: 20px;
}

.empty :global(.ant-empty-description) {
  color: inherit;
  margin: 0;
}

/* 响应式设计 */
@media (max-width: 768px) {
  .empty {
    padding: 30px 15px;
    min-height: 160px;
  }

  .empty.large {
    padding: 40px 20px;
    min-height: 240px;
  }

  .icon {
    font-size: 56px;
  }

  .icon.large {
    font-size: 72px;
  }

  .description {
    max-width: 300px;
  }

  .title {
    font-size: 15px;
  }

  .text {
    font-size: 13px;
  }
}

@media (max-width: 480px) {
  .empty {
    padding: 20px 10px;
    min-height: 140px;
  }

  .icon {
    font-size: 48px;
  }

  .icon.large {
    font-size: 64px;
  }

  .description {
    max-width: 250px;
  }

  .title {
    font-size: 14px;
  }

  .text {
    font-size: 12px;
  }
}

/* 深色主题适配 */
[data-theme='dark'] .icon {
  color: #434343;
}

[data-theme='dark'] .title {
  color: #d9d9d9;
}

[data-theme='dark'] .text {
  color: #8c8c8c;
}

/* 特殊场景的图标颜色 */
.empty[data-type='search'] .icon {
  color: #1890ff;
}

.empty[data-type='student'] .icon {
  color: #52c41a;
}

.empty[data-type='course'] .icon {
  color: #faad14;
}

.empty[data-type='schedule'] .icon {
  color: #722ed1;
}

.empty[data-type='file'] .icon {
  color: #13c2c2;
}

[data-theme='dark'] .empty[data-type='search'] .icon {
  color: #177ddc;
}

[data-theme='dark'] .empty[data-type='student'] .icon {
  color: #49aa19;
}

[data-theme='dark'] .empty[data-type='course'] .icon {
  color: #d89614;
}

[data-theme='dark'] .empty[data-type='schedule'] .icon {
  color: #9254de;
}

[data-theme='dark'] .empty[data-type='file'] .icon {
  color: #08979c;
}

/* 动画效果 */
.empty {
  animation: emptyFadeIn 0.3s ease-out;
}

@keyframes emptyFadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* 图标悬停效果 */
.icon {
  transition: all 0.3s ease;
}

.iconWrapper:hover .icon {
  transform: scale(1.05);
}

/* 全屏空状态 */
.empty.fullscreen {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #ffffff;
  z-index: 1000;
  min-height: 100vh;
}

[data-theme='dark'] .empty.fullscreen {
  background-color: #141414;
}

/* 内联空状态 */
.empty.inline {
  display: inline-flex;
  padding: 20px;
  min-height: auto;
  flex-direction: row;
  gap: 12px;
  text-align: left;
}

.empty.inline .description {
  max-width: none;
}

.empty.inline :global(.ant-empty-image) {
  margin-bottom: 0;
  margin-right: 12px;
}

.empty.inline .icon {
  font-size: 24px;
}